<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>


<header class="am-topbar admin-header">
		<div class="am-topbar-brand">
			<img src="assets/i/logo.png">
		</div>

		<div class="am-collapse am-topbar-collapse" id="topbar-collapse">
			<ul class="am-nav am-nav-pills am-topbar-nav admin-header-list">
					<li class="am-dropdown tognzhi" data-am-dropdown>
					<button class="am-btn am-btn-primary am-dropdown-toggle am-btn-xs am-radius am-icon-bell-o"
						data-am-dropdown-toggle  id="totalCom" style="width: 100px">
						消息管理
					</button>
					<ul class="am-dropdown-content">



						<li class="am-dropdown-header">所有消息都在这里</li>

						<li><a href="StudentComplain.jsp">学员申诉<span class="am-badge am-badge-danger am-round" id="studentCom"></span></a></li>
						<li><a href="CoachComplain.jsp">教练申诉 <span class="am-badge am-badge-danger am-round" id="coachCom"></span></a></li>
						<li><a href="GymComplain.jsp">会馆申诉 <span class="am-badge am-badge-danger am-round" id="gymCom"></span></a></li>

					</ul>
					</li>

				<li class="kuanjie">
						<a href="javaScript:void(0)">学员管理</a>
						<a href="javaScript:void(0)">教练管理</a>
					<a href="javaScript:void(0)">会馆信息</a>
				</li>

				<li class="am-hide-sm-only" style="float: right;">
					<a href="javascript:;" id="admin-fullscreen">
						<span class="am-icon-arrows-alt"></span>
						<span class="admin-fullText">开启全屏</span>
					</a>
				</li>
			</ul>
		</div>
	</header>
	
	<script type="text/javascript">
	$(function(){
		//alert(1);
		//显示消息通知数字
		$.ajax({
			url:"/index_admin/showMesNum",
			type:"get",
			dataType:"json",
			success:function(data){
				if(data.unReadStudent!=0){
					$("#studentCom").html(data.unReadStudent);
				}
				if(data.unReadCoach!=0){
					$("#coachCom").html(data.unReadCoach);
				}
				if(data.unReadGym!=0){
					$("#gymCom").html(data.unReadGym);
				}
				var total=data.unReadStudent+data.unReadCoach+data.unReadGym;
				if(total!=0){
					$("#totalCom").html("消息管理<span class='am-badge am-badge-danger am-round'>"+total+"</span>");
				}else{
					$("#totalCom").html("消息管理<span class='am-badge am-badge-danger am-round'></span>");
				}
			}
		});
	});
	</script>